package CareerUp.CamelCase;

import junit.framework.TestCase;

public class CamelCaseTest extends TestCase {

	public void testCamelCase() {
		CamelCase cc = new CamelCase();
		// test empty string
		cc.setInputStr("");
		assertEquals("", cc.camelCaseConvertion());

		// test null
		cc.setInputStr(null);
		assertEquals("", cc.camelCaseConvertion());

		// string start with upper case
		cc.setInputStr("CamelCase");
		assertEquals("camel_case", cc.camelCaseConvertion());

		// normal input
		cc.setInputStr("camelCase");
		assertEquals("camel_case", cc.camelCaseConvertion());

		// lengthy test
		cc.setInputStr("ThisAppearsToBeLongEnoughToProveItWorksCorrect!");
		assertEquals("this_appears_to_be_long_enough_to_prove_it_works_correct!", cc.camelCaseConvertion());
	}
}
